<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>边框--楔形</title>
    <style>
        div {
            margin: 0 auto;
        }

        div.box1 {
            width: 200px;
            height: 200px;
            border-top: 10px solid red;
            border-right: 10px solid green;
            border-left: 10px solid green;
        }

        div.box2 {
            width: 220px;
            margin-top: 10px;
            border-top: 10px solid red;
        }

        div.box2 .inner {
            height: 200px;
            border-right: 10px solid green;
            border-left: 10px solid green;
        }
    </style>
</head>

<body>
    <!-- 楔形 -->
    <div class="box1">楔形</div>
    <!-- 不希望出现楔形，将边框设置为不同盒子的边框即可 -->
    <div class="box2">
        <div class="inner">去掉楔形：</div>
    </div>
</body>

</html>